package com.itheima.pratice.demo;

public class VariableParameter {//可变参数练习
    public static void main(String[] args) {
        System.out.println(sum(10,20));
    }

    private static int sum(int...a) {
        int sum = 0;
        for (int i : a) {
            sum+= i;
        }
        return sum;
    }
}
